package idiet.bean;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the food_ingredient_element database table.
 * 
 */
@Entity
@Table(name="food_ingredient_element")
public class FoodIngredientElement implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String comment;

	@Column(name="en_name")
	private String enName;

	@Column(name="lm_timestamp")
	private Timestamp lmTimestamp;

	private String name;

	@Column(name="short_en_name")
	private String shortEnName;
	
	@Column(name="short_name")
	private String shortName;

	//bi-directional many-to-one association to FoodIngredient
	@OneToMany(mappedBy="foodIngredientElement")
	private List<FoodIngredient> foodIngredients;

	//bi-directional many-to-one association to FoodIngredientElementUnit
	@ManyToOne
	@JoinTable(name="food_ingredient_element_unit",
	joinColumns=@JoinColumn(name="element_id"),
	inverseJoinColumns=@JoinColumn(name="unit_id"))
	private Unit unit;

	@OneToMany(mappedBy="foodIngredientElement")
	private List<Rni> rni;
	
	public FoodIngredientElement() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getEnName() {
		return this.enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}

	public Timestamp getLmTimestamp() {
		return this.lmTimestamp;
	}

	public void setLmTimestamp(Timestamp lmTimestamp) {
		this.lmTimestamp = lmTimestamp;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getShortEnName() {
		return this.shortEnName;
	}

	public void setShortEnName(String shortEnName) {
		this.shortEnName = shortEnName;
	}

	public String getShortName() {
		return this.shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	public List<FoodIngredient> getFoodIngredients() {
		return this.foodIngredients;
	}

	public void setFoodIngredients(List<FoodIngredient> foodIngredients) {
		this.foodIngredients = foodIngredients;
	}

	public Unit getUnit() {
		return unit;
	}

	public void setUnit(Unit unit) {
		this.unit = unit;
	}

	public List<Rni> getRni() {
		return rni;
	}

	public void setRni(List<Rni> rni) {
		this.rni = rni;
	}
}